package com.myworld.configuration.exception;

import javax.servlet.http.HttpServletRequest;

import org.springframework.web.bind.annotation.ControllerAdvice;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.ResponseBody;

@ControllerAdvice
public class ExceptionAdvice {
	
	@ExceptionHandler({Exception.class})
	@ResponseBody
	public String handleException(HttpServletRequest request,Exception e) throws Exception{
		e.printStackTrace();
		
		return e.getMessage();
	}
}
